package com.app.service.Impl;

import com.app.mapper.SystemMapper;
import com.app.model.SystemConfigModel;
import com.app.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SystemServiceImpl implements SystemService {
    @Autowired
    private SystemMapper systemMapper;
    @Override
    public SystemConfigModel integralConfig(Integer activityIntegral) {
        SystemConfigModel model = new SystemConfigModel();
        model.setId(2);
        model.setIntegral(activityIntegral);
        systemMapper.updateById(model);
        return model;
    }

    @Override
    public SystemConfigModel integralConfig() {
        return systemMapper.selectById(2);
    }
}
